const files = require.context('./', true,/index.jsx$/)
const pages = {}

files.keys().forEach(filePath => {
  const key = filePath.match(/.*\/(.*)\/index.jsx$/)[1]
  pages[key] = files(filePath).default
})

export default pages
